<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    /* 把home元素里面的span元素都给设置为红色 */
    /* span {

      color: red;
    } */
    /* 方法一：一个一个去加class */
  /* .home-item {
    color: red;
  } */
  /* 方法二:后代选择器，必须要掌握 ，所有的·后代均被选中*/
  /* .home子代的span元素设置一个背景:直接子代 */
  .home span{
    color: red;
    font-size: 30px;
  }
  .home>span {
    background-color: green;
  }
  </style>
</head>
<body>
  <div class="home">
    <span>啦啦啦啦</span>
    <div class="box">
      <p>我是p元素</p>
      <span class="home-item">呵呵呵呵</span>
    </div>  
  

  <div class="content">
    <div class="desc">
      <p><span class="home-item">哈哈哈</span>
      </p>
    </div>
  </div>
  </div>    

<span>嘻嘻嘻嘻</span>
<div>
  <span>嘿嘿嘿</span>
</div>
</body>
</html>